package com.zzty.training.service.impl;

import com.zzty.training.dao.QuestionDao;
import com.zzty.training.entity.Question;
import com.zzty.training.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    QuestionDao questionDao;
    @Override
    public List<Question> getAllQuestion() {
        List<Question> questions =questionDao.getAllQuestion();
        return questions;
    }
    @Override
    public Integer addQuestion(Question question){
        Integer res=questionDao.addQuestion(question);
        return res;
    }
    @Override
    public Question getQuestionByContent(Question question){
        Question question1=questionDao.getQuestionByContent(question);
        return question1;
    }
}
